package org.meetunexpectedly.entity.video;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.meetunexpectedly.entity.BaseEntity;
import org.meetunexpectedly.entity.user.User;

/**
 * @Description: 评论表
 * @Author: pupil
 * @Date: 2025/1/19 下午 9:25
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Comment extends BaseEntity{
    private static final long serialVersionUID = 1L;

    // 评论或者回复用户id
    private Long fromUserId;

    // 被回复用户id
    private Long toUserId;

    // 视频id
    private Long videoId;

    // 父级评论id
    private Long parentId;

    // 顶级评论id
    private Long rootId;

    // 视频作者id
    private Long videoUserId;

    // 评论内容
    private String content;

    // 评论点赞数
    private Long thumbCount;

    // 子评论数
    private Long childCount;

    // 评论或者回复用户
    @TableField(exist = false)
    private User fromUser;

    // 被回复用户
    @TableField(exist = false)
    private User toUser;

    // 是否点赞
    @TableField(exist = false)
    private Boolean thumb;
}
